<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <link rel="shortcut icon" type="image/x-icon" href="/Images/favicon.ico" media="screen">
    <title>约翰迪尔(甘肃)-融资租赁计算器</title>
    <style>* {
        margin: 0;
        padding: 0;
        font-family: "微软雅黑", 'Microsoft YaHei';
    }

    body {
        background: #fff;
    }

    html {
        font-size: 62.5%;
    }

    .content {
        width: 100%;
        position: relative;
        top: 0;
        padding-bottom: 100px;
    }

    .boxTwo {
        display: none;
    }

    .title {
        background: #199ed8;
        color: #fff;
        height: 120px;
        line-height: 120px;
        font-size: 50px;
        text-align: center;
        font-weight: bold;
    }

    .item {
        height: 75px;
        line-height: 75px;
        background: #fff;
        border-bottom: 2px solid #ddd;
    }

    .item .text {
        width: 240px;
        float: left;
        background: #f2f2f2;
        text-align: right;
        padding-right: 20px;
        font-size: 25px;
        font-weight: bold;
    }

    .item .box {
        float: right;
        width: 470px;
        padding-left: 20px;
        height: 100%;
        position: relative;
        font-size: 25px;
    }

    .return {
        font-size: 25px;
        color: #199ed8;
        font-weight: bold;
    }

    .item .box p {
        width: 90%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 25px;
        color: #999;
        cursor: pointer;
    }

    .item .box input {
        color: #333;
        outline: none;
        width: 90%;
        height: 72px;
        font-size: 25px;
        margin-top: 2px;
        border: none;
    }

    .right-arrow {
        position: absolute;
        background: url(/Images/Buy/buy-icon.png);
        background-position: 0px -375px;
        width: 20px;
        height: 40px;
        right: 20px;
        top: 20px;
    }

    .btn {
        position: fixed;
        bottom: 10px;
        left: 50%;
        margin-left: -355px;
        width: 710px;
        background: #199ed8;
        border-radius: 20px;
        height: 75px;
        line-height: 75px;
        color: #fff;
        font-size: 35px;
        text-align: center;
        font-weight: bold;
        cursor: pointer;
    }

    .select-view {
        width: 100%;
        height: 60%;
        position: fixed;
        bottom: 0em;
        left: 0em;
        background-color: white;
        z-index: 100;
        display: none;
        padding-bottom: 110px;
    }

    .select-view .select-title {
        background-color: #f2f2f2;
        text-align: center;
        height: 100px;
        line-height: 100px;
        border-top: 1px solid #dedfe0;
        border-bottom: 1px solid #dedfe0;
        font-size: 30px;
    }

    .select-title .select-cancel {
        float: left;
        color: #ff5500;
        margin-left: 10px;
        cursor: pointer;
    }

    .select-title .select-sure {
        float: right;
        color: #ff5500;
        margin-right: 10px;
        cursor: pointer;
    }

    .select-view .item {
        display: inline-block;
        width: 95%;
        height: 80px;
        text-align: left;
        border: none;
        border-bottom: 1px solid #dedfe0;
        color: #929292;
        margin-left: 10px;
        background-color: white;
        font-size: 30px;
        outline: none;
    }

    #overlay {
        background: #000;
        filter: alpha(opacity=50);
        /* IE的透明度 */
        opacity: 0.5;
        /* 透明度 */
        position: absolute;
        top: 0px;
        left: 0px;
        width: 100%;
        height: 100%;
        z-index: 10;
        /* 此处的图层要大于页面 */
        display: none;
    }

    ::-webkit-input-placeholder { /* WebKit browsers */
        color: #999;
    }

    :-moz-placeholder { /* Mozilla Firefox 4 to 18 */
        color: #999;
        opacity: 1;
    }

    ::-moz-placeholder { /* Mozilla Firefox 19+ */
        color: #999;
        opacity: 1;
    }

    :-ms-input-placeholder { /* Internet Explorer 10+ */
        color: #999;
    }</style>
</head>
<body>
<div class="content">
    <div class="title">约翰迪尔-融资租赁计算器(甘肃)</div>
    <div class="boxOne">
        <div class="item">
            <div class="text">型号</div>
            <div class="box proModel"><p>请选择</p><i class="right-arrow"></i></div>
        </div>
        <div class="item">
            <div class="text">购买单价</div>
            <div class="box price"><input type="number" placeholder="请输入" class="pro-price"></div>
        </div>
        <div class="item">
            <div class="text">台数</div>
            <div class="box number"><input type="number" placeholder="请输入" class="pro-number"></div>
        </div>
        <div class="item">
            <div class="text">首付比例</div>
            <div class="box proBl"><p>请选择</p><i class="right-arrow"></i></div>
        </div>
        <div class="item">
            <div class="text">贷款年限</div>
            <div class="box proYear"><p>请选择</p><i class="right-arrow"></i></div>
        </div>
        <div class="item">
            <div class="text">第三者险最高理赔额</div>
            <div class="box proThree"><p>请选择</p><i class="right-arrow"></i></div>
        </div>
        <div class="item">
            <div class="text">设备购买总价</div>
            <div class="box return totalPrice">--</div>
        </div>
        <div class="item">
            <div class="text">设备首付款</div>
            <div class="box return downPayment">--</div>
        </div>
        <div class="item">
            <div class="text">保证金</div>
            <div class="box return bond">--</div>
        </div>
        <div class="item">
            <div class="text">手续费</div>
            <div class="box return serviceCharge">--</div>
        </div>
        <div class="item">
            <div class="text">GPS</div>
            <div class="box return gps">--</div>
        </div>
        <div class="item">
            <div class="text">所有保费合计</div>
            <div class="box return premium">--</div>
        </div>
        <div class="item">
            <div class="text">最终购车总价</div>
            <div class="box return finalPrice">--</div>
        </div>
    </div>
    <div class="boxTwo">
        <div class="item">
            <div class="text">设备购买总价</div>
            <div class="box totalPrice">--</div>
        </div>
        <div class="item">
            <div class="text return">设备首付款</div>
            <div class="box return downPayment">--</div>
        </div>
        <div class="item">
            <div class="text">贷款额</div>
            <div class="box loan">--</div>
        </div>
        <div class="item">
            <div class="text return">保证金</div>
            <div class="box return bond">--</div>
        </div>
        <div class="item">
            <div class="text return">手续费</div>
            <div class="box return serviceCharge">--</div>
        </div>
        <div class="item">
            <div class="text return">GPS</div>
            <div class="box return gps">--</div>
        </div>
        <div class="item">
            <div class="text">主险金额</div>
            <div class="box mainInsurance">--</div>
        </div>
        <div class="item">
            <div class="text">第三者险金额</div>
            <div class="box threeInsurance">--</div>
        </div>
        <div class="item">
            <div class="text">机上人员险金额</div>
            <div class="box personnelInsurance">--</div>
        </div>
        <div class="item">
            <div class="text return">所有保费合计</div>
            <div class="box return premium">--</div>
        </div>
        <div class="item">
            <div class="text">月还款额</div>
            <div class="box monthlyRepayment">--</div>
        </div>
        <div class="item">
            <div class="text">首付款合计</div>
            <div class="box downPaymentTotal">--</div>
        </div>
        <div class="item">
            <div class="text">贷款利息合计</div>
            <div class="box loanInterestTotal">--</div>
        </div>
        <div class="item">
            <div class="text return">最终购车总价</div>
            <div class="box return finalPrice">--</div>
        </div>
    </div>
    <div attrpage="1" class="btn">查看结果</div>
    <div id="overlay"></div><!-- @*型号*@-->
    <section id="proModel" class="select-view">
        <div class="select-title"><span class="select-cancel">取消</span><span>型号</span></div>
        <div style="overflow: scroll; height:100%;">
            <div><input data-key="" type="button" value="E130SC" class="item"></div>
            <div><input data-key="" type="button" value="E140LC" class="item"></div>
            <div><input data-key="" type="button" value="E210SC" class="item"></div>
            <div><input data-key="" type="button" value="E210LC" class="item"></div>
            <div><input data-key="" type="button" value="E230LC" class="item"></div>
            <div><input data-key="" type="button" value="E240SC" class="item"></div>
            <div><input data-key="" type="button" value="E240LC" class="item"></div>
            <div><input data-key="" type="button" value="E260LC" class="item"></div>
            <div><input data-key="" type="button" value="E300LC" class="item"></div>
            <div><input data-key="" type="button" value="E330LC" class="item"></div>
            <div><input data-key="" type="button" value="E360SC" class="item"></div>
            <div><input data-key="" type="button" value="E360LC" class="item"></div>
            <div><input data-key="" type="button" value="WL53" class="item"></div>
            <div><input data-key="" type="button" value="WL56" class="item"></div>
        </div>
    </section><!-- @*首付比例*@-->
    <section id="proBl" class="select-view">
        <div class="select-title"><span class="select-cancel">取消</span><span>首付比例</span></div>
        <div style="overflow: scroll; height:100%;">
            <div><input data-key="0.2" type="button" value="20%" class="item"></div>
            <div><input data-key="0.25" type="button" value="25%" class="item"></div>
            <div><input data-key="0.3" type="button" value="30%" class="item"></div>
            <div><input data-key="0.35" type="button" value="35%" class="item"></div>
            <div><input data-key="0.4" type="button" value="40%" class="item"></div>
            <div><input data-key="0.45" type="button" value="45%" class="item"></div>
            <div><input data-key="0.5" type="button" value="50%" class="item"></div>
            <div><input data-key="0.55" type="button" value="55%" class="item"></div>
            <div><input data-key="0.6" type="button" value="60%" class="item"></div>
            <div><input data-key="0.65" type="button" value="65%" class="item"></div>
            <div><input data-key="0.7" type="button" value="70%" class="item"></div>
            <div><input data-key="0.75" type="button" value="75%" class="item"></div>
            <div><input data-key="0.8" type="button" value="80%" class="item"></div>
            <div><input data-key="0.85" type="button" value="85%" class="item"></div>
            <div><input data-key="0.9" type="button" value="90%" class="item"></div>
            <div><input data-key="0.95" type="button" value="95%" class="item"></div>
            <div><input data-key="1" type="button" value="100%" class="item"></div>
        </div>
    </section><!-- @*贷款年限*@-->
    <section id="proYear" class="select-view">
        <div class="select-title"><span class="select-cancel">取消</span><span>贷款年限</span></div>
        <div style="overflow: scroll; height:100%;">
            <div><input data-key="1.0" type="button" value="1.0" class="item"></div>
            <div><input data-key="1.5" type="button" value="1.5" class="item"></div>
            <div><input data-key="2.0" type="button" value="2.0" class="item"></div>
            <div><input data-key="2.5" type="button" value="2.5" class="item"></div>
            <div><input data-key="3.0" type="button" value="3.0" class="item"></div>
        </div>
    </section><!-- @*第三者险最高理赔额*@-->
    <section id="proThree" class="select-view">
        <div class="select-title"><span class="select-cancel">取消</span><span>第三者险最高理赔额</span></div>
        <div style="overflow: scroll; height:100%;">
            <div><input data-key="50" type="button" value="500000" class="item"></div>
            <div><input data-key="100" type="button" value="1000000" class="item"></div>
        </div>
    </section>
</div>
<script src="/Scripts/jquery-1.10.2.min.js"></script>
<script type="text/javascript">;(function () {
    var scale = (screen.width / 750).toFixed(2);
    document.write('<meta name="viewport" content="width=750,minimum-scale = ' + scale + ',maximum-scale = ' + scale + ' ,target-densitydpi=device-dpi"/>');
})();</script>
<script>var thisEle = "";

/* 当前页面高度 */
function pageHeight() {
    return document.body.scrollHeight;
}

/* 当前页面宽度 */
function pageWidth() {
    return document.body.scrollWidth;
}

/* 显示遮罩层 */
function showOverlay() {

    // fadeTo第一个参数为速度，第二个为透明度
    // 多重方式控制透明度，保证兼容性，但也带来修改麻烦的问题
    $("#overlay").fadeTo(200, 0.5);

}

/* 隐藏覆盖层 */
function hideOverlay() {
    $("#overlay").fadeOut(100);
}

function PMT(rate, term, price) {
    //var rate=parseFloat(rate);
    //var term=parseFloat(term);
    //var price=parseFloat(price);
    //var v=parseFloat((1+(rate/12)));
    //var t=parseFloat((-(term/12)*12));
    //pmt = parseFloat((price*(rate/12))/(1-Math.pow(v,t)))
    var v1 = parseFloat(price * (rate / 12))
    var v = parseFloat(1 + (rate / 12))
    var t = parseFloat(-(term / 12) * 12)
    var v2 = parseFloat(1 - Math.pow(v, t))
    pmt = parseFloat(v1 / v2)
    return pmt;
}

//点击各种下拉事件
$(".boxOne").on("click", ".proModel,.proBl,.proYear,.proThree", function () {
    thisEle = this;
    var field = $(thisEle).attr("class").split(" ")[1];
    $("#" + field).show();
    showOverlay();
});
//自定义下拉框取消事件
$("body").on("click", ".select-cancel", function () {
    //var svid = $(this).parents(".select-view").attr("id");
    //if (svid == "proBrands") {
    //    $(this).parents(".select-view").find(".check-box .check-no,.check-yes").attr("class", "check-no");
    //}
    $(this).parents(".select-view").hide();
    hideOverlay();
});
//自定义下拉框确定事件
$("body").on("click", ".select-sure", function () {
    var svid = $(this).parents(".select-view").attr("id");
    if (svid == "proBrands") {
    }
    $(this).parents(".select-view").hide();
    hideOverlay();
});
$(".boxOne").on("blur", ".pro-price,.pro-number", function () {
    $(".boxOne").show();
    $(".boxTwo").hide();
    $(".btn").text("查看结果")
    $(".btn").attr("attrpage", 1)
    $(".totalPrice").text("--")
    $(".downPayment").text("--")
    $(".bond").text("--")
    $(".serviceCharge").text("--")
    $(".gps").text("--")
    $(".loan").text("--")

    $(".premium").text("--")
    $(".downPaymentTotal").text("--")
    $(".monthlyRepayment").text("--")
    $(".loanInterestTotal").text("--")
    $(".finalPrice").text("--")
})
//自定义下拉框选项点击事件
$(".select-view").on("click", ".item", function () {
    var svid = $(this).parents(".select-view").attr("id");
    $(thisEle).find("p").text($(this).val());
    $(thisEle).find("p").attr("att-value", $(this).attr("data-key"))
    $(thisEle).find("p").css("color", "#333");
    $(".select-view").hide();
    hideOverlay();
    $(".boxOne").show();
    $(".boxTwo").hide();
    $(".btn").text("查看结果")
    $(".btn").attr("attrpage", 1)
    $(".totalPrice").text("--")
    $(".downPayment").text("--")
    $(".bond").text("--")
    $(".serviceCharge").text("--")
    $(".gps").text("--")
    $(".loan").text("--")

    $(".premium").text("--")
    $(".downPaymentTotal").text("--")
    $(".monthlyRepayment").text("--")
    $(".loanInterestTotal").text("--")
    $(".finalPrice").text("--")
});

$(".btn").click(function () {
    if ($(this).attr("attrPage") == 1) {
        if ($(".proModel p").text() == "请选择") {
            alert("请选择型号");
            return false;
        }
        if ($(".price input").val() == "") {
            alert("请输入单价");
            return false;
        }
        if ($(".number input").val() == "") {
            alert("请输入数量");
            return false;
        }
        if ($(".proBl p").text() == "请选择") {
            alert("请选择首付比例");
            return false;
        }
        if ($(".proYear p").text() == "请选择") {
            alert("请选择贷款年限");
            return false;
        }
        if ($(".proThree p").text() == "请选择") {
            alert("请选择第三者险最高理赔额");
            return false;
        }
        $(this).text("查看详细结果")
        $(this).attr("attrpage", 2)
        var totalPrice = ($(".price input").val() * $(".number input").val()).toFixed(2);
        var downPayment = (totalPrice * $(".proBl p").attr("att-value")).toFixed(2);
        var loan = (totalPrice * (1 - $(".proBl p").attr("att-value"))).toFixed(2);
        var bond = (loan * 0.05).toFixed(2);
        var serviceCharge = (loan * 0.01).toFixed(2);
        var gps = 8000
        if ($(".proYear p").attr("att-value") == "1.0" || $(".proYear p").attr("att-value") == "2.0" || $(".proYear p").attr("att-value") == "3.0") {
            var mainInsurance = ((totalPrice * 0.01035) / 12 * $(".proYear p").attr("att-value") * 12).toFixed(2);
            var personnelInsurance = ($(".proYear p").attr("att-value") * 200).toFixed(2);
            if ($(".proThree p").attr("att-value") == "100") {
                var threeInsurance = ($(".proYear p").attr("att-value") * 2300).toFixed(2);
            } else {
                var threeInsurance = ($(".proYear p").attr("att-value") * 1250).toFixed(2);
            }
        } else if ($(".proYear p").attr("att-value") == "1.5") {
            var mainInsurance = ((totalPrice * 0.01035) / 12 * 12 + totalPrice * 0.01035 / 12 * 0.6 * 12).toFixed(2);
            var personnelInsurance = 320;
            if ($(".proThree p").attr("att-value") == "100") {
                var threeInsurance = 3680;
            } else {
                var threeInsurance = 2000;
            }
        } else if ($(".proYear p").attr("att-value") == "2.5") {
            var mainInsurance = ((totalPrice * 0.01035) / 12 * 2 * 12 + totalPrice * 0.01035 / 12 * 0.6 * 12).toFixed(2);
            var personnelInsurance = 520;
            if ($(".proThree p").attr("att-value") == "100") {
                var threeInsurance = 5980;
            } else {
                var threeInsurance = 3250;
            }
        }
        //年利率

        if ($(".proModel p").text() == "E140LC" || $(".proModel p").text() == "E130") {
            if ($(".proYear p").attr("att-value") == "1.0") {
                var monthlyRepayment = loan / ($(".proYear p").attr("att-value") * 12)
            }
            else if ($(".proYear p").attr("att-value") == "1.5" || $(".proYear p").attr("att-value") == "2.0") {
                var monthlyRepayment = PMT(0.0399, $(".proYear p").attr("att-value") * 12, loan);
            }
            else {
                var monthlyRepayment = PMT(0.0699, $(".proYear p").attr("att-value") * 12, loan);
            }
        } else {
            if ($(".proYear p").attr("att-value") == "1.0") {
                var monthlyRepayment = PMT(0.0499, $(".proYear p").attr("att-value") * 12, loan);
            }
            else if ($(".proYear p").attr("att-value") == "1.5" || $(".proYear p").attr("att-value") == "2.0") {
                var monthlyRepayment = PMT(0.0599, $(".proYear p").attr("att-value") * 12, loan);
            }
            else {
                var monthlyRepayment = PMT(0.0699, $(".proYear p").attr("att-value") * 12, loan);
            }
        }
        var premium = (Number(mainInsurance) + Number(personnelInsurance) + Number(threeInsurance)).toFixed(2);
        var downPaymentTotal = (Number(downPayment) + Number(bond) + Number(serviceCharge) + (Number(gps)) + Number(premium)).toFixed(2);

        var loanInterestTotal = (monthlyRepayment * $(".proYear p").attr("att-value") * 12 - loan).toFixed(2);
        var finalPrice = (Number(loan) + Number(downPaymentTotal) + Number(loanInterestTotal) - Number(bond)).toFixed(2);
        $(".totalPrice").text(totalPrice)
        $(".downPayment").text(downPayment)
        $(".bond").text(bond)
        $(".serviceCharge").text(serviceCharge)
        $(".gps").text(gps)
        $(".loan").text(loan)

        $(".mainInsurance").text(mainInsurance)
        $(".personnelInsurance").text(personnelInsurance)
        $(".threeInsurance").text(threeInsurance)
        $(".premium").text(premium)
        $(".downPaymentTotal").text(downPaymentTotal)
        $(".monthlyRepayment").text(monthlyRepayment.toFixed(2))
        $(".loanInterestTotal").text(loanInterestTotal)
        $(".finalPrice").text(finalPrice)
    } else if ($(this).attr("attrPage") == 2) {
        $(".boxOne").hide();
        $(".boxTwo").show();

        $(this).text("重新计算")
        $(this).attr("attrpage", 3)
    } else {
        $(".boxOne").show();
        $(".boxTwo").hide();
        $(this).text("查看结果")
        $(this).attr("attrpage", 1)
        $(".totalPrice").text("")
        $(".downPayment").text("")
        $(".bond").text("")
        $(".serviceCharge").text("")
        $(".gps").text("")
        $(".loan").text("")

        $(".premium").text("")
        $(".downPaymentTotal").text("")
        $(".monthlyRepayment").text("")
        $(".loanInterestTotal").text("")
        $(".finalPrice").text("")
    }
})</script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>var url = window.location.href;
var title = '约翰迪尔（甘肃）-融资租赁计算器';
var discuss = '融资租赁计算器';
var shareImgUrl = 'http://m.ershouhui.com/Images/Wechart/shareC.png';
var timestamp;
var noncestr;
var signature;
//获取签名
$.ajax({
    type: "GET",
    url: "/wshare/getSignature",
    //data:{timestamp:timestamp,noncestr:noncestr,url:url},
    data: {url: url},
    success: function (data) {
        console.log("success");
        var objData = JSON.parse(data);
        timestamp = objData.timestamp;
        noncestr = objData.noncestr;
        signature = objData.signature;
        console.log(objData);
        wxShare();
    },
    statusCode: {
        404: function () {
            alert('page not found');
        }
    }
});

function wxShare() {
    wx.config({
        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
        appId: 'wx02dd58fff0a8d8db', // 和获取Ticke的必须一样------必填，公众号的唯一标识
        timestamp: timestamp, // 必填，生成签名的时间戳
        nonceStr: noncestr, // 必填，生成签名的随机串
        signature: signature,// 必填，签名，见附录1
        jsApiList: [
            'onMenuShareAppMessage', 'onMenuShareTimeline', 'onMenuShareTimeline', 'onMenuShareQQ', 'onMenuShareQZone'
        ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
    });
}

wx.ready(function () {
    //config信息验证后会执行ready方法，所有接口调用都必须在config接口获得结果之后，
    //config是一个客户端的异步操作，所以如果需要在页面加载时就调用相关接口，则须把相关
    //接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口，则可以直接调用，不需要放在ready函数中。

    //----------“分享给朋友”
    wx.onMenuShareAppMessage({
        title: title, // 分享标题
        desc: discuss, // 分享描述
        link: url, // 分享链接
        imgUrl: shareImgUrl, // 分享图标
        success: function () {

        },
        cancel: function () {
            // 用户取消分享后执行的回调函数
        }
    });
    //------------"分享到朋友圈"
    wx.onMenuShareTimeline({
        title: title, // 分享标题
        desc: discuss, // 分享描述
        link: url, // 分享链接
        imgUrl: shareImgUrl, // 分享图标
        type: '', // 分享类型,music、video或link，不填默认为link
        dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        success: function () {


            // 用户确认分享后执行的回调函数、
        },
        cancel: function () {
            alert('取消分享成功!');
            // 用户取消分享后执行的回调函数
        }
    });
    //-------------分享到QQ
    wx.onMenuShareQQ({
        title: title, // 分享标题
        desc: discuss, // 分享描述
        link: url, // 分享链接
        imgUrl: shareImgUrl, // 分享图标
        type: '', // 分享类型,music、video或link，不填默认为link
        dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        success: function () {


        },
        cancel: function () {
            // 用户取消分享后执行的回调函数
        }
    });
    //-------------分享到QQ空间
    wx.onMenuShareQZone({
        title: title, // 分享标题
        desc: discuss, // 分享描述
        link: url, // 分享链接
        imgUrl: shareImgUrl, // 分享图标
        type: '', // 分享类型,music、video或link，不填默认为link
        dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        success: function () {

        },
        cancel: function () {
            // 用户取消分享后执行的回调函数
        }
    });

});
wx.error(function (res) {
    // config信息验证失败会执行error函数，如签名过期导致验证失败，具体错误信息可以打开config的debug模式查看，也可以在返回的res参数中查看，对于SPA可以在这里更新签名。
    console.log(res);
});</script>
</body>
</html>